]> git.r.bdr.sh - rbdr/super-polarity/blame - Super Polarity/MainShip.cs
Adds Visual Studio gitignore
[rbdr/super-polarity] / Super Polarity / MainShip.cs
CommitLineData
63a61ee2
BB
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using Microsoft.Xna.Framework;
6using Microsoft.Xna.Framework.Graphics;
7
8namespace SuperPolarity
9{
10 class MainShip
11 {
12 public Texture2D PlayerTexture;
13 public Vector2 Position;
14 public bool Active;
15 public int Lives;
16 public int Multiplier;
17 public int Score;
18 public float Angle;
19
20 public int Width
21 {
22 get { return PlayerTexture.Width; }
23 }
24
25 public int Height
26 {
27 get { return PlayerTexture.Height; }
28 }
29
30 public void Initialize(Texture2D texture, Vector2 position)
31 {
32 PlayerTexture = texture;
33 Position = position;
34 Active = true;
35 Multiplier = 1;
36 Lives = 3;
37 Score = 0;
38 }
39
40 public void Update()
41 {
42 }
43
44 public void Draw(SpriteBatch spriteBatch)
45 {
46 spriteBatch.Draw(PlayerTexture, Position, null, Color.White, Angle, Vector2.Zero, 1f, SpriteEffects.None, 0f);
47 }
48 }
49}